<!DOCTYPE HTML>
<html style="min-height:100%;">
<head>
    <title>Tor态势感知</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="/images/favicon.ico" type="image/x-icon" rel="shortcut icon">

    <!-- yes, we are handheld friendly :) -->
    <meta name="HandheldFriendly" content="True">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">

    <!-- icons for mobile devices -->
    <link rel="apple-touch-icon" href="/images/apple-touch-icon-152x152.png">
    <link rel="shortcut icon" href="/images/android-icon.png" sizes="196x196">
    <!-- jQuery -->
    <script type="text/javascript" src="/js/jquery.min.js"></script>

    <!-- Bootstrap -->
    <link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.min.css"/>
    <script type="text/javascript" src="/bootstrap/js/bootstrap.min.js"></script>

    <!-- Fonts -->
    <link rel="stylesheet" href="/css/font-awesome.min.css">
    <link rel="stylesheet" href="/fonts/source-sans-pro.css">

    <!-- Prism -->
    <link rel="stylesheet" href="/css/prism.css">
    <script type="text/javascript" src="/js/prism.js"></script>

    <!-- custom styles and javascript -->
    <link rel="stylesheet" href="/css/style.css">
    <script type="text/javascript" src="/js/script.js"></script>
    <!-- layer -->
    <script type="text/javascript" src="/layer/layer.js"></script>
    <!-- common.js -->
    <script type="text/javascript" src="/js/common.js"></script>
    <!-- echarts.js -->
    <script type="text/javascript" src="/js/echarts.common.js"></script>
    <script type="text/javascript" src="/js/macarons.js"></script>
    <script type="text/javascript" src="/js/shine.js"></script>

</head>

<body class="noscript" style="">

<!-- Using evil inline stylesheets to hide the FOUC for slow connections... -->

<div id="wrapper" style="display:none;">

    <!-- backToTop-Button and Anchor -->
    <noscript>
        <div class="topButton" style="display:block;"><a href="#top"><i class="fa fa-chevron-up" aria-hidden="true"></i></a>
        </div>
    </noscript>
    <script type="text/javascript">
        document.write('<div class="topButton" style="display:none;"><a href="#top"><i class="fa fa-chevron-up" aria-hidden="true"></i></a></div>');
    </script>
    <a id="top"></a>

    <!-- secondary navigation -->
    <nav class="navbar navbar-default navbar-secondary">
        <div class="container-fluid">
            <input type="checkbox" id="navbar-toggle-checkbox">
            <div class="navbar-header">
                <label for="navbar-toggle-checkbox" type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                       data-target="#bs-example-navbar-secondary" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </label>
                <a class="navbar-brand visible-xs" href="/"><img src="/images/tor-metrics-white.png" width="232"
                                                                 height="50" alt="Tor Metrics"></a>
            </div>
        </div><!-- /.container-fluid -->
    </nav>
    <!-- /secondary navigation -->

    <!-- page header for every single page -->
    <div class="page-header hidden-xs">
        <a href="/"><img src="/images/tor-metrics-white@2x.png" width="232" height="50" alt="Tor Metrics"
                         id="metrics-wordmark"></a>
        <div class="clearfix"></div>
    </div>
    <!-- /page header -->

    <!-- primary navigation -->
    <nav class="navbar navbar-default hidden-xs">
        <div class="container-fluid">
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-primary">
                <ul class="nav navbar-nav">
                    <li><a href="/"><i class="" aria-hidden="true"></i> Home</a></li>

                    <li class=" active"><a href="/userstats-bridge-combined.html"><i class="" aria-hidden="true"></i>
                        用户信息&nbsp;&nbsp;&nbsp;&nbsp;</a></li>

                    <li class=""><a href="/servers.html"><i class="" aria-hidden="true"></i> 服务器信息&nbsp;&nbsp;&nbsp;&nbsp;</a></li>

                    <li class=""><a href="/traffic.html"><i class="" aria-hidden="true"></i> 流量信息&nbsp;&nbsp;&nbsp;&nbsp;</a></li>

                    <li class=""><a href="/torperf.html"><i class="" aria-hidden="true"></i> 性能&nbsp;&nbsp;&nbsp;&nbsp;</a>
                    </li>

                    <li class=""><a href="/hidserv-dir-onions-seen.html"><i class="" aria-hidden="true"></i> 洋葱服务&nbsp;&nbsp;&nbsp;&nbsp;</a>
                    </li>



                </ul>
            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
    <!-- /primary navigation -->


    <div class="container">
        <ul class="breadcrumb">
            <li><a href="/">Home</a></li>
            <li class="active">用户信息</li>
        </ul>
    </div>

    <div class="container">
        <p>通过客户端对中继以及网桥节点发送的请求，预估用户数量</p>
    </div>

    <div class="container">

        <!-- tabs -->
        <ul class="nav nav-tabs">

            <li role="presentation"><a href="relay-country.html" data-tab="userstats-relay-country">中继用户</a></li>

            <li role="presentation"><a href="userstats-bridge-country.html" data-tab="userstats-bridge-country">桥节点用户（国家）</a></li>

            <li role="presentation" ><a href="userstats-bridge-transport.html" data-tab="userstats-bridge-transport">桥节点用户（混淆方式）</a></li>

            <li role="presentation" class="active"><a href="userstats-bridge-combined.html" data-tab="userstats-bridge-combined">桥节点用户（国家与混淆方式）</a></li>

            <li role="presentation"><a href="userstats-bridge-version.html" data-tab="userstats-bridge-version">桥节点用户（IP版本）</a></li>

            <li role="presentation"><a href="bridgedb-transport.html" data-tab="bridgedb-transport">BridgeDB请求（混淆方式）</a></li>

            <li role="presentation"><a href="bridgedb-distributor.html" data-tab="bridgedb-distributor">BridgeDB请求（分发商）</a></li>

            <li role="presentation"><a href="userstats-relay-table.html" data-tab="userstats-relay-table">中继用户Top国家和地区</a></li>

            <li role="presentation"><a href="userstats-bridge-table.html" data-tab="userstats-bridge-table">网桥用户Top国家和地区</a></li>


        </ul>

        <!-- tab-content -->
        <div class="tab-content">
            <div class="tab-pane active" id="tab-">

                <div class="row">
                    <div class="col-md-8">
                        <div id="main" style="width: 800px; height: 600px;"></div>
                    </div>

                    <div class="col-md-4">

                        <form id="form1" onsubmit="return false" action="##" method="get">
                            <p>
                                <label for="start">Start date:</label>
                                <input type="date" name="start" size="10" value="2020-05-04" placeholder="yyyy-mm-dd"
                                       id="start">
                            </p>

                            <p>
                                <label for="country"><b>国家:</b></label>
                                <select name="country" id="country">

                                    <option value="all" selected>All users</option>

                                    <option value="af">Afghanistan</option>

                                    <option value="ax">Aland Islands</option>

                                    <option value="al">Albania</option>

                                    <option value="dz">Algeria</option>

                                    <option value="as">American Samoa</option>

                                    <option value="ad">Andorra</option>

                                    <option value="ao">Angola</option>

                                    <option value="ai">Anguilla</option>

                                    <option value="aq">Antarctica</option>

                                    <option value="ag">Antigua and Barbuda</option>

                                    <option value="ar">Argentina</option>

                                    <option value="am">Armenia</option>

                                    <option value="aw">Aruba</option>

                                    <option value="au">Australia</option>

                                    <option value="at">Austria</option>

                                    <option value="az">Azerbaijan</option>

                                    <option value="bs">Bahamas</option>

                                    <option value="bh">Bahrain</option>

                                    <option value="bd">Bangladesh</option>

                                    <option value="bb">Barbados</option>

                                    <option value="by">Belarus</option>

                                    <option value="be">Belgium</option>

                                    <option value="bz">Belize</option>

                                    <option value="bj">Benin</option>

                                    <option value="bm">Bermuda</option>

                                    <option value="bt">Bhutan</option>

                                    <option value="bo">Bolivia</option>

                                    <option value="bq">Bonaire, Sint Eustatius and Saba</option>

                                    <option value="ba">Bosnia and Herzegovina</option>

                                    <option value="bw">Botswana</option>

                                    <option value="bv">Bouvet Island</option>

                                    <option value="br">Brazil</option>

                                    <option value="io">British Indian Ocean Territory</option>

                                    <option value="bn">Brunei</option>

                                    <option value="bg">Bulgaria</option>

                                    <option value="bf">Burkina Faso</option>

                                    <option value="mm">Burma</option>

                                    <option value="bi">Burundi</option>

                                    <option value="kh">Cambodia</option>

                                    <option value="cm">Cameroon</option>

                                    <option value="ca">Canada</option>

                                    <option value="cv">Cape Verde</option>

                                    <option value="ky">Cayman Islands</option>

                                    <option value="cf">Central African Republic</option>

                                    <option value="td">Chad</option>

                                    <option value="cl">Chile</option>

                                    <option value="cn">China</option>

                                    <option value="cx">Christmas Island</option>

                                    <option value="cc">Cocos (Keeling) Islands</option>

                                    <option value="co">Colombia</option>

                                    <option value="km">Comoros</option>

                                    <option value="cd">Congo, The Democratic Republic of the</option>

                                    <option value="cg">Congo</option>

                                    <option value="ck">Cook Islands</option>

                                    <option value="cr">Costa Rica</option>

                                    <option value="ci">C&#244;te d'Ivoire</option>

                                    <option value="hr">Croatia</option>

                                    <option value="cu">Cuba</option>

                                    <option value="cw">Cura&#231;ao</option>

                                    <option value="cy">Cyprus</option>

                                    <option value="cz">Czech Republic</option>

                                    <option value="dk">Denmark</option>

                                    <option value="dj">Djibouti</option>

                                    <option value="dm">Dominica</option>

                                    <option value="do">Dominican Republic</option>

                                    <option value="ec">Ecuador</option>

                                    <option value="eg">Egypt</option>

                                    <option value="sv">El Salvador</option>

                                    <option value="gq">Equatorial Guinea</option>

                                    <option value="er">Eritrea</option>

                                    <option value="ee">Estonia</option>

                                    <option value="et">Ethiopia</option>

                                    <option value="fk">Falkland Islands (Malvinas)</option>

                                    <option value="fo">Faroe Islands</option>

                                    <option value="fj">Fiji</option>

                                    <option value="fi">Finland</option>

                                    <option value="fr">France</option>

                                    <option value="gf">French Guiana</option>

                                    <option value="pf">French Polynesia</option>

                                    <option value="tf">French Southern Territories</option>

                                    <option value="ga">Gabon</option>

                                    <option value="gm">Gambia</option>

                                    <option value="ge">Georgia</option>

                                    <option value="de">Germany</option>

                                    <option value="gh">Ghana</option>

                                    <option value="gi">Gibraltar</option>

                                    <option value="gr">Greece</option>

                                    <option value="gl">Greenland</option>

                                    <option value="gd">Grenada</option>

                                    <option value="gp">Guadeloupe</option>

                                    <option value="gu">Guam</option>

                                    <option value="gt">Guatemala</option>

                                    <option value="gg">Guernsey</option>

                                    <option value="gn">Guinea</option>

                                    <option value="gw">Guinea-Bissau</option>

                                    <option value="gy">Guyana</option>

                                    <option value="ht">Haiti</option>

                                    <option value="hm">Heard Island and McDonald Islands</option>

                                    <option value="va">Vatican City</option>

                                    <option value="hn">Honduras</option>

                                    <option value="hk">Hong Kong</option>

                                    <option value="hu">Hungary</option>

                                    <option value="is">Iceland</option>

                                    <option value="in">India</option>

                                    <option value="id">Indonesia</option>

                                    <option value="ir">Iran</option>

                                    <option value="iq">Iraq</option>

                                    <option value="ie">Ireland</option>

                                    <option value="im">Isle of Man</option>

                                    <option value="il">Israel</option>

                                    <option value="it">Italy</option>

                                    <option value="jm">Jamaica</option>

                                    <option value="jp">Japan</option>

                                    <option value="je">Jersey</option>

                                    <option value="jo">Jordan</option>

                                    <option value="kz">Kazakhstan</option>

                                    <option value="ke">Kenya</option>

                                    <option value="ki">Kiribati</option>

                                    <option value="kp">North Korea</option>

                                    <option value="kr">Korea, Republic of</option>

                                    <option value="xk">Kosovo</option>

                                    <option value="kw">Kuwait</option>

                                    <option value="kg">Kyrgyzstan</option>

                                    <option value="la">Laos</option>

                                    <option value="lv">Latvia</option>

                                    <option value="lb">Lebanon</option>

                                    <option value="ls">Lesotho</option>

                                    <option value="lr">Liberia</option>

                                    <option value="ly">Libya</option>

                                    <option value="li">Liechtenstein</option>

                                    <option value="lt">Lithuania</option>

                                    <option value="lu">Luxembourg</option>

                                    <option value="mo">Macau</option>

                                    <option value="mk">Macedonia</option>

                                    <option value="mg">Madagascar</option>

                                    <option value="mw">Malawi</option>

                                    <option value="my">Malaysia</option>

                                    <option value="mv">Maldives</option>

                                    <option value="ml">Mali</option>

                                    <option value="mt">Malta</option>

                                    <option value="mh">Marshall Islands</option>

                                    <option value="mq">Martinique</option>

                                    <option value="mr">Mauritania</option>

                                    <option value="mu">Mauritius</option>

                                    <option value="yt">Mayotte</option>

                                    <option value="mx">Mexico</option>

                                    <option value="fm">Micronesia, Federated States of</option>

                                    <option value="md">Moldova, Republic of</option>

                                    <option value="mc">Monaco</option>

                                    <option value="mn">Mongolia</option>

                                    <option value="me">Montenegro</option>

                                    <option value="ms">Montserrat</option>

                                    <option value="ma">Morocco</option>

                                    <option value="mz">Mozambique</option>

                                    <option value="na">Namibia</option>

                                    <option value="nr">Nauru</option>

                                    <option value="np">Nepal</option>

                                    <option value="an">Netherlands Antilles</option>

                                    <option value="nl">Netherlands</option>

                                    <option value="nc">New Caledonia</option>

                                    <option value="nz">New Zealand</option>

                                    <option value="ni">Nicaragua</option>

                                    <option value="ne">Niger</option>

                                    <option value="ng">Nigeria</option>

                                    <option value="nu">Niue</option>

                                    <option value="nf">Norfolk Island</option>

                                    <option value="mp">Northern Mariana Islands</option>

                                    <option value="no">Norway</option>

                                    <option value="om">Oman</option>

                                    <option value="pk">Pakistan</option>

                                    <option value="pw">Palau</option>

                                    <option value="ps">Palestinian Territory</option>

                                    <option value="pa">Panama</option>

                                    <option value="pg">Papua New Guinea</option>

                                    <option value="py">Paraguay</option>

                                    <option value="pe">Peru</option>

                                    <option value="ph">Philippines</option>

                                    <option value="pn">Pitcairn Islands</option>

                                    <option value="pl">Poland</option>

                                    <option value="pt">Portugal</option>

                                    <option value="pr">Puerto Rico</option>

                                    <option value="qa">Qatar</option>

                                    <option value="re">Reunion</option>

                                    <option value="ro">Romania</option>

                                    <option value="ru">Russia</option>

                                    <option value="rw">Rwanda</option>

                                    <option value="bl">Saint Bartelemey</option>

                                    <option value="sh">Saint Helena</option>

                                    <option value="kn">Saint Kitts and Nevis</option>

                                    <option value="lc">Saint Lucia</option>

                                    <option value="mf">Saint Martin</option>

                                    <option value="pm">Saint Pierre and Miquelon</option>

                                    <option value="vc">Saint Vincent and the Grenadines</option>

                                    <option value="ws">Samoa</option>

                                    <option value="sm">San Marino</option>

                                    <option value="st">S&#227;o Tom&#233; and Pr&#237;ncipe</option>

                                    <option value="sa">Saudi Arabia</option>

                                    <option value="sn">Senegal</option>

                                    <option value="rs">Serbia</option>

                                    <option value="sc">Seychelles</option>

                                    <option value="sl">Sierra Leone</option>

                                    <option value="sg">Singapore</option>

                                    <option value="sx">Sint Maarten</option>

                                    <option value="sk">Slovakia</option>

                                    <option value="si">Slovenia</option>

                                    <option value="sb">Solomon Islands</option>

                                    <option value="so">Somalia</option>

                                    <option value="za">South Africa</option>

                                    <option value="gs">South Georgia and the South Sandwich Islands</option>

                                    <option value="ss">South Sudan</option>

                                    <option value="es">Spain</option>

                                    <option value="lk">Sri Lanka</option>

                                    <option value="sd">Sudan</option>

                                    <option value="sr">Suriname</option>

                                    <option value="sj">Svalbard and Jan Mayen</option>

                                    <option value="sz">Swaziland</option>

                                    <option value="se">Sweden</option>

                                    <option value="ch">Switzerland</option>

                                    <option value="sy">Syrian Arab Republic</option>

                                    <option value="tw">Taiwan</option>

                                    <option value="tj">Tajikistan</option>

                                    <option value="tz">Tanzania, United Republic of</option>

                                    <option value="th">Thailand</option>

                                    <option value="tl">East Timor</option>

                                    <option value="tg">Togo</option>

                                    <option value="tk">Tokelau</option>

                                    <option value="to">Tonga</option>

                                    <option value="tt">Trinidad and Tobago</option>

                                    <option value="tn">Tunisia</option>

                                    <option value="tr">Turkey</option>

                                    <option value="tm">Turkmenistan</option>

                                    <option value="tc">Turks and Caicos Islands</option>

                                    <option value="tv">Tuvalu</option>

                                    <option value="ug">Uganda</option>

                                    <option value="ua">Ukraine</option>

                                    <option value="ae">United Arab Emirates</option>

                                    <option value="gb">United Kingdom</option>

                                    <option value="um">United States Minor Outlying Islands</option>

                                    <option value="us">United States</option>

                                    <option value="uy">Uruguay</option>

                                    <option value="uz">Uzbekistan</option>

                                    <option value="vu">Vanuatu</option>

                                    <option value="ve">Venezuela</option>

                                    <option value="vn">Vietnam</option>

                                    <option value="vg">Virgin Islands, British</option>

                                    <option value="vi">Virgin Islands, U.S.</option>

                                    <option value="wf">Wallis and Futuna</option>

                                    <option value="eh">Western Sahara</option>

                                    <option value="ye">Yemen</option>

                                    <option value="zm">Zambia</option>

                                    <option value="zw">Zimbabwe</option>

                                </select>
                            </p>

                            <p>
                                <input class="submit" type="button" value="更新图像" onclick="getData()">
                            </p>

                        </form>

                    </div><!-- col-md-4 -->
                </div><!-- row -->
            </div><!-- tab-pane -->
        </div><!-- tab-content -->
    </div><!-- container -->

    <div class="container-fluid" id="footer">

        <div class="container no-gutter">
            <div class="col-xs-6">
                <p>
                    &copy; 2009&ndash;2018 <a href="https://www.torproject.org/" target="_blank">The Tor Project</a>
                </p>
            </div>
            <div class="col-xs-6">
                <p class="pull-right">

                    <a href="/about.html#contact">Contact</a>

                </p>
            </div>
        </div>

        <div class="container small">

            <p>This material is supported in part by the National Science Foundation
                under Grant No. CNS-0959138. Any opinions, finding, and conclusions or
                recommendations expressed in this material are those of the author(s) and do not
                necessarily reflect the views of the National Science Foundation. "Tor" and the
                "Onion Logo" are <a href="https://www.torproject.org/docs/trademark-faq.html.en"
                                    target="_blank">registered trademarks</a> of The Tor Project, Inc.. Data on this
                site is freely available under a <a
                        href="https://creativecommons.org/publicdomain/zero/1.0/" target="_blank">CC0 no
                    copyright declaration</a>: To the extent possible under law, the Tor Project has
                waived all copyright and related or neighboring rights in the data. Graphs are
                licensed under a <a href="https://creativecommons.org/licenses/by/3.0/us/"
                                    target="_blank">Creative Commons Attribution 3.0 United States License</a>.</p>

        </div>

    </div><!-- /footer -->

</div><!-- /wrapper -->

</body>
</html>

<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'), 'macarons');
    var title_text = "当前全球混淆插件用户分布图";
    var obfs2 = 0;
    var obfs3 = 0;
    var obfs4 = 0;
    var websocket = 0;
    var fte = 0;
    var meek = 0;
    var scramblesuit = 0;
    var snowflake = 0;
    var defaultOP = 0;
    //AJAX接收数据主体
    $.ajax({
        type: "GET",
        url: "/users/bridge_combined_default",
        dataType: "json",
        data: {},
        async: false,
        success: function (result) {
            if (result.code === 0) {
                for (var key in result.data){
                    switch (key) {
                        case "<OR>":
                            defaultOP = result.data[key];
                            break;
                        case "obfs2":
                            obfs2 = result.data[key];
                            break;
                        case "obfs3":
                            obfs3 = result.data[key];
                            break;
                        case "obfs4":
                            obfs4 = result.data[key];
                            break;
                        case "websocket":
                            websocket = result.data[key];
                            break;
                        case "fte":
                            fte = result.data[key];
                            break;
                        case "meek":
                            meek = result.data[key];
                            break;
                        case "scramblesuit":
                            scramblesuit = result.data[key];
                            break;
                        case "snowflake":
                            snowflake = result.data[key];
                            break;
                    }
                }
            } else {
                layer.msg(result.msg);
            }
        },
        error: function () {
            layer.msg("获取后台数据失败！");
        }
    });

    //指定图表的配置项和数据
    option = {
        title: {
            text: title_text,
            left: 'center'
        },
        tooltip: {
            trigger: 'item',
            formatter: '{a} <br/>{b} : {c} ({d}%)'
        },
        legend: {
            orient: 'vertical',
            left: 'left',
            data: ['obfs2', 'obfs3', 'obfs4', 'websocket', 'fte','meek','scramblesuit','snowflake','defaultOP']
        },
        series: [
            {
                name: '混淆类型',
                type: 'pie',
                radius: '55%',
                center: ['50%', '60%'],
                data: [
                    {value: obfs2, name: 'obfs2'},
                    {value: obfs3, name: 'obfs3'},
                    {value: obfs4, name: 'obfs4'},
                    {value: websocket, name: 'websocket'},
                    {value: fte, name: 'fte'},
                    {value: meek, name: 'meek'},
                    {value: scramblesuit, name: 'scramblesuit'},
                    {value: snowflake, name: 'snowflake'},
                    {value: defaultOP, name: 'defaultOP'},
                ],
                emphasis: {
                    itemStyle: {
                        shadowBlur: 10,
                        shadowOffsetX: 0,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>


<script type="text/javascript">
    function getData() {
        var myChart = echarts.init(document.getElementById('main'),'macarons');
        var title_text = "混淆插件用户分布图";
        var obfs2 = 0;
        var obfs3 = 0;
        var obfs4 = 0;
        var websocket = 0;
        var fte = 0;
        var meek = 0;
        var scramblesuit = 0;
        var snowflake = 0;
        var defaultOP = 0;
        //AJAX接收数据主体
        $.ajax({
            type: "GET",
            url: "/users/bridge_combined",
            dataType: "json",
            data: $('#form1').serialize(),
            async: false,
            success: function (result) {
                if (result.code == 0) {
                    for (var key in result.data){
                        switch (key) {
                            case "<OR>":
                                defaultOP = result.data[key];
                                break;
                            case "obfs2":
                                obfs2 = result.data[key];
                                break;
                            case "obfs3":
                                obfs3 = result.data[key];
                                break;
                            case "obfs4":
                                obfs4 = result.data[key];
                                break;
                            case "websocket":
                                websocket = result.data[key];
                                break;
                            case "fte":
                                fte = result.data[key];
                                break;
                            case "meek":
                                meek = result.data[key];
                                break;
                            case "scramblesuit":
                                scramblesuit = result.data[key];
                                break;
                            case "snowflake":
                                snowflake = result.data[key];
                                break;
                        }
                    }
                    title_text = result.msg + "混淆插件用户分布图";
                } else {
                    layer.msg(result.msg);
                }
            },
            error: function () {
                layer.msg("获取后台数据失败！");
            }
        });
        //指定图表的配置项和数据
        option = {
            title: {
                text: title_text,
                left: 'center'
            },
            tooltip: {
                trigger: 'item',
                formatter: '{a} <br/>{b} : {c} ({d}%)'
            },
            legend: {
                orient: 'vertical',
                left: 'left',
                data: ['obfs2', 'obfs3', 'obfs4', 'websocket', 'fte','meek','scramblesuit','snowflake','defaultOP']
            },
            series: [
                {
                    name: '混淆类型',
                    type: 'pie',
                    radius: '55%',
                    center: ['50%', '60%'],
                    data: [
                        {value: obfs2, name: 'obfs2'},
                        {value: obfs3, name: 'obfs3'},
                        {value: obfs4, name: 'obfs4'},
                        {value: websocket, name: 'websocket'},
                        {value: fte, name: 'fte'},
                        {value: meek, name: 'meek'},
                        {value: scramblesuit, name: 'scramblesuit'},
                        {value: snowflake, name: 'snowflake'},
                        {value: defaultOP, name: 'defaultOP'},
                    ],
                    emphasis: {
                        itemStyle: {
                            shadowBlur: 10,
                            shadowOffsetX: 0,
                            shadowColor: 'rgba(0, 0, 0, 0.5)'
                        }
                    }
                }
            ]
        };
        myChart.setOption(option);
    }

</script>